home *** CD-ROM | disk | FTP | other *** search
- global HARP, TIGO, HORN, DRUM, CHIME, BASS, sPALETTE, gObjects, gOBJECTSD, gWorld, gPuppetlines, sQTCharSprite, gNextEnvLetter, gMIDIPlayTRUE, gInitalized, noteObjs, windowsMIDIXObj, xNAVXOBJ, xCURXOBJ, gCPU, gFileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName
-
- on MakehornChaotic RefNum
- set OBj to getaProp(gObjects, RefNum)
- playSound(getaProp(OBj, #sound), #cast)
- repeat with NUM = 1 to count(getaProp(getaProp(OBj, #cast), #UP))
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getAt(getaProp(getaProp(OBj, #cast), #UP), NUM)
- updateStage()
- end repeat
- repeat with NUM = count(getaProp(getaProp(OBj, #cast), #UP)) down to 1
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getAt(getaProp(getaProp(OBj, #cast), #UP), NUM)
- updateStage()
- end repeat
- ChangeSpecialState(#HORN, #Chaotic)
- eraseRecording(#HORN)
- end
-
- on playHorn RefNum
- if getaProp(getaProp(gObjects, #HORN), #State) = #nonChaotic then
- playNonChaoticHorn(RefNum)
- else
- playChaoticHorn(RefNum)
- end if
- end
-
- on playNonChaoticHorn RefNum
- set OBj to getaProp(gObjects, RefNum)
- set HoleNum to getaProp(OBj, #HoleNum)
- set halfTone to indexedNoteInInstrumentScale(HORN, 8 - HoleNum)
- set note to 60 + halfTone - 1
- noteOn(#HORN, note, 127)
- repeat while the mouseDown
- CursorandUpdate()
- end repeat
- noteOff(#HORN, note)
- end
-
- on playChaoticHorn RefNum
- set OBj to getaProp(gObjects, RefNum)
- set HoleNum to getaProp(OBj, #HoleNum)
- PlayNoteFromHitMap(#HORN)
- end
-